package com.designpatterns.businessdelegatepattern;

import com.designpatterns.businessdelegatepattern.impl.EJBService;
import com.designpatterns.businessdelegatepattern.impl.JMSService;

// 查询使用哪个服务
public class BusinessLookUp
{
	public BusinessService getBusinessService(String serviceType){
	      if(serviceType.equalsIgnoreCase("EJB")){
	         return new EJBService();
	      }else {
	         return new JMSService();
	      }
	   }
}
